<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script type="text/javascript">
    function show(r){
        var a = parseInt(r)*parseInt(r)*3.14;
        var b = parseInt(r)*2*3.14;
        alert("面积是："+a+"  周长是："+b);
    }
    var a = show(prompt("亲输入一个半径长度"));
</script>
</body>
</html>